Add CPT dashboard metadata fields to ES documents#1239
Conversation
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: arpsharm The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Add CPT-compatible fields (ocpVersion, releaseStream, ciSystem, platform, benchmark, workerNodesCount, masterNodesCount, startDate, endDate, jobStatus) to workload metadata so benchmark-runner results appear on the CPT dashboard alongside kube-burner workloads.
56aab17 to
5ba8d99
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
benchmark_runner/workloads/workloads_operations.py (1)
466-466: 💤 Low valueConsider extracting platform detection to a dedicated method for consistency.
Other cluster metadata (OCP version, CNV version, etc.) use dedicated methods in the
OCclass. This inlineoc.run()call works but is inconsistent with the codebase pattern. A method likeget_cluster_platform()would improve maintainability and allow reuse.♻️ Suggested refactor
Add to
benchmark_runner/common/oc/oc.py:def get_cluster_platform(self): """ This method returns the cluster platform (e.g., AWS, GCP, BareMetal). :return: platform string """ return self.run(fr""" {self._cli} get infrastructure cluster -o jsonpath="{{.status.platform}}" """).strip()Then in
workloads_operations.py:- 'platform': self._oc.run("oc get infrastructure cluster -o jsonpath='{.status.platform}'").strip().strip("'"), + 'platform': self._oc.get_cluster_platform(),🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@benchmark_runner/workloads/workloads_operations.py` at line 466, The inline oc.run() call in the workloads_operations.py file at line 466 is inconsistent with the codebase pattern where other cluster metadata operations use dedicated methods in the OC class. Add a new method called get_cluster_platform() to the OC class in benchmark_runner/common/oc/oc.py that returns the cluster platform by running the infrastructure cluster query and stripping whitespace, then replace the inline oc.run() call in workloads_operations.py with a call to self._oc.get_cluster_platform() for consistency and maintainability.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@benchmark_runner/workloads/workloads_operations.py`:
- Line 466: The inline oc.run() call in the workloads_operations.py file at line
466 is inconsistent with the codebase pattern where other cluster metadata
operations use dedicated methods in the OC class. Add a new method called
get_cluster_platform() to the OC class in benchmark_runner/common/oc/oc.py that
returns the cluster platform by running the infrastructure cluster query and
stripping whitespace, then replace the inline oc.run() call in
workloads_operations.py with a call to self._oc.get_cluster_platform() for
consistency and maintainability.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 91b5aaa1-20e2-4b7c-be32-d572a9cee5f8
📒 Files selected for processing (1)
benchmark_runner/workloads/workloads_operations.py
Add CPT-compatible metadata fields to
__get_metadata()andjobStatusmapping toupdate_ci_status()so benchmark-runner results can appear on the CPT dashboard alongside kube-burner workloads. Existing fields preserved for backward compatibility.Summary by CodeRabbit
Release Notes